home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW etc / MPW-GM / MPW / Examples / PPCExamples / CPlusExamples / CPlusTESample / CPlusTESample ReadMe next >
Encoding:
Text File  |  1998-12-03  |  2.5 KB  |  65 lines  |  [TEXT/MPS ]

  1.  
  2.  
  3. CPlusTESample is a simple C++ text editing application.  This sample demonstrates
  4. how a C++ program can be built for both 68K and PowerPC platforms.  The makefile
  5. provided can build 68K, PowerPC and FAT (both 68K and PowerPC in one) versions.
  6.  
  7. How to build:
  8. -------------
  9.  
  10. By default, CPlusTESample.make builds debuggable CPlusTESample.  Use:
  11.  
  12. make -f CPlusTESample.make
  13.  
  14. To build only the PowerPC version, use:
  15.  
  16. make -f CPlusTESample.make CPlusTESample.ppc
  17.  
  18. To build only the 68K version, use:
  19.  
  20. make -f CPlusTESample.make CPlusTESample.68K
  21.  
  22. To build a non-debug version of the above, add the option "-d SymOpt=off" as in:
  23.  
  24. make -d SymOpt=off -f CPlusTESample.make CPlusTESample.ppc
  25.  
  26. Use the option "-e" to force everything to be rebuilt.
  27.  
  28. This version of CPlusTESample was derived from the 68K version.  The 68K version
  29. was in multiple folders, here all of the sources are in a single folder for
  30. simplicity.
  31.  
  32. A few changes were needed to make CPlusTESample work with both the 68K and PowerPC:
  33.  
  34. * The Universal headers shipped with the Macintosh on RISC Tools were used for
  35.   both 68K and PowerPC builds.
  36.   
  37. * The main change was the use of UniversalProcPointers instead of function
  38.   pointers in a few places.  You can find these in the code by searching for "upp".
  39.   
  40. * The assembler glue routine, "ASMCLICKLoop" was eliminated in the PowerPC version.
  41.   Taking advantage of the glue that MixedMode provides, this routine was rewritten
  42.   in C.
  43.   
  44. * The makefile was re-written.
  45.  
  46. Implementation Details:
  47. ----------------------
  48.  
  49. There are four main classes in this program. Each of these classes has a
  50. definition (.h) file and an implementation (.cp) file.  
  51.    
  52. The TApplication class does all of the basic event handling and initialization 
  53. necessary for Mac Toolbox applications. It maintains a list of TEcocument 
  54. objects, and passes events to the correct TEDocument class when apropriate. 
  55.   
  56. The TEDocument class does all of the basic document handling work. TEDocuments
  57. are objects that are associated with a window. Methods are provided to deal
  58. with update, activate, mouse-click, key down, and other events. Some additional
  59. classes which implement a linked list of TEDocument objects are provided. 
  60.  
  61. The TApplication and TEDocument classes together define a basic framework for
  62. Mac applications, without having any specific knowbedge about the type of data
  63. being displayed by the application's documents. They are a (very) crude
  64. implementation of the MacApp application model, without the sophisticated view
  65. heirarchies or any real error handling.